


<?php

$cur = basename($_SERVER["REQUEST_URI"]);

function contains($substring, $string) {

	$pos = strpos($string, $substring);

	if ($pos === false){
		return false;
	}
	else {
		return true;
	}
}

?>
<div id="container">
<img style="postition:absolute; top:0px; float:right" src="images/penguin.jpg">

    <div id="header">

      <div id="logo">
        <h1><span><a href="#">gwack admin</a></span></h1>
      </div>		

      <div id="menu">
        <ul>
		  <?php 
			if ($cur == "index.php")
					 echo '<li class="selected"><span class="selected-arrow">&nbsp;</span>';
			else 
			 echo '<li>';
		
			 echo '<a href="index.php">Dashboard</a></li>';
	
			
            if ($cur == "settings.php" || contains("objectsettings.php", $cur))
             echo '<li class="selected"><span class="selected-arrow">&nbsp;</span>';
			else
				echo '<li>';
			echo '<a href="settings.php">Settings</a></li>';

			
            if (contains('newobject.php', $cur)){
             echo '<li class="selected"><span class="selected-arrow">&nbsp;</span>';
			 echo '<a href="newobject.php">Add GW Object</a>';
			 echo '</li>';	
			 }
            else {
             echo '<li><a href="newobject.php">Add GW Object</a>';
			 echo '</li>';
			}	

			?>

        </ul>

      </div><!-- end of #menu -->
      
  </div><!-- end of  #header -->
</div>
